
var imgDir = "";
var is_liuzi = false;//判断当前页为留资页面的时候，禁用横屏判断
var can_reload = true;
var music = document.getElementById("bgmusic");
var wrap_content = $("#wrap_content");
$(function(){
//		FastClick.attach(document.body);//取消屏幕触碰的300ms延迟
	//加载资源
	
		var dataList = {
			images:[
				//loading页面
				imgDir+"images/loading/begin_zhuzi.png",
				imgDir+"images/loading/loading_bg_guanzi.jpg",
				imgDir+"images/loading/logo.png",
				imgDir+"images/loading/shuiwen.png",
				
				//home页面
				imgDir+"images/home/logo.png",
				
				//game页面
				imgDir+"images/game/0.png",
				imgDir+"images/game/1.png",
				imgDir+"images/game/10.png",
				imgDir+"images/game/11.png",
				imgDir+"images/game/12.png",
				imgDir+"images/game/13.png",
				imgDir+"images/game/14.png",
				imgDir+"images/game/15.png",
				imgDir+"images/game/16.png",
				imgDir+"images/game/2.png",
				imgDir+"images/game/3.png",
				imgDir+"images/game/4.png",
				imgDir+"images/game/5.png",
				imgDir+"images/game/6.png",
				imgDir+"images/game/7.png",
				imgDir+"images/game/8.png",
				imgDir+"images/game/9.png",
				imgDir+"images/game/charector.png",
				imgDir+"images/game/end_bg.jpg",
				imgDir+"images/game/left_jiantou.png",
				imgDir+"images/game/middle_zhuzi_tou.png",
				imgDir+"images/game/middle_zhuzi2.png",
				imgDir+"images/game/right_jiantou.png",
				imgDir+"images/game/shuiwen.png",
				imgDir+"images/game/user_head.jpg",
				imgDir+"images/game/zhuzi.jpg",
				
				//paiming页面
				imgDir+"images/paiming/01.jpg",
				imgDir+"images/paiming/lingjiang_btn.jpg",
				imgDir+"images/paiming/paiming.png",
				imgDir+"images/paiming/shai_btn.png",
				imgDir+"images/paiming/text_share.png",
				
				//liuzi页面
				imgDir+"images/liuzi/huoqu_btn.jpg",
				imgDir+"images/liuzi/logo.png",
				imgDir+"images/liuzi/yanzheng_btn.jpg",
				
				//choujiang页面
				imgDir+"images/choujiang/chouing_btn.jpg",
				imgDir+"images/choujiang/choujiang_btn.jpg",
				imgDir+"images/choujiang/icon1.png",
				imgDir+"images/choujiang/icon2.png",
				imgDir+"images/choujiang/icon3.png",
				imgDir+"images/choujiang/icon4.png",
				imgDir+"images/choujiang/icon5.png",
				imgDir+"images/choujiang/icon6.png",
				imgDir+"images/choujiang/icon7.png",
				imgDir+"images/choujiang/icon8.png",
				imgDir+"images/choujiang/jiangpin.png",
				imgDir+"images/choujiang/logo.png",
				imgDir+"images/choujiang/text_share2.jpg",
				imgDir+"images/choujiang/zaichou_btn.jpg"
			],
			js:[
//				"__JS__/card.min.js"
			],
			css:[
//				"__CSS__/card.min.css"
				
//				"css/reset.css",
//				"css/common.css",
//				"css/home.css",
//				"css/game.css",
//				"css/paiming.css",
//				"css/liuzi.css",
//				"css/choujiang.css"
			]
		}
//      reload_page("home.html",true,dataList);
//alert(templateURL+"game.html");
		reload_page(templateURL+"game.html");
	
	//给整个页面相关元素添加路由侦听事件
	$(".wrap_content").on("touchstart", ".reload_page", function (e) {
		e.preventDefault();
//		music.play();
	    var url = $(this).attr("url");
//	    alert(templateURL+url);
	    reload_page(templateURL+url);
	})
})




//横屏检测
window.onresize = resizeTips;
resizeTips();
